home *** CD-ROM | disk | FTP | other *** search
- position1 = "Blank";
- position2 = "Blank";
- position3 = "Blank";
- position4 = "Blank";
-
- function testButton(form) {
- for (Count = 0; Count < 4; Count++) {
- if (form.position1[Count].checked)
- position1 = Count;
- if (form.position2[Count].checked)
- position2 = Count;
- if (form.position3[Count].checked)
- position3 = Count;
- if (form.position4[Count].checked)
- position4 = Count;
- }
-
- RightAnswer1 = 0;
- RightAnswer2 = 1;
- RightAnswer3 = 2;
- RightAnswer4 = 3;
-
- NumberCorrect = 0;
- CorrectAnswerPage = './htcas-xray2.html';
- WrongAnswerPage = './lightcurve_match2.html';
-
- if (position1 == RightAnswer1) {
- NumberCorrect++;
- }
- if (position2 == RightAnswer2) {
- NumberCorrect++;
- }
- if (position3 == RightAnswer3) {
- NumberCorrect++;
- }
- if (position4 == RightAnswer4) {
- NumberCorrect++;
- }
-
- if (NumberCorrect == 4) {
- alert ("Congratulations you got them all!");
- location = CorrectAnswerPage;
- }
- else {
- alert ("You answered " +NumberCorrect + " out of 4 questions correctly. Keep trying!");
- }
- }
-
-
-